package com.example.demo.demos.web;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
@Data
@Component
@ConfigurationProperties(prefix = "app")
public class AppProperties {
    public String name;
    public int age;
    public List<String> hobby;
    public Map<String,String> city;

    @Override
    public String toString() {
        return "AppProperties{" +
                "name:'" + name + '\'' +
                ", age:" + age +
                ", hobby[0]:" + hobby.get(0) +
                ", hobby[1]:" + hobby.get(1) +
                ", city:" + city+
                '}';
    }
}
